package com.agileboot.attendance.domain.personnel.db;

import com.agileboot.common.core.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 人员信息表
 * </p>
 *
 * @author agileboot
 * @since 2023-03-14
 */
@Getter
@Setter
@TableName("att_personnel")
@ApiModel(value = "AttPersonnelEntity对象", description = "人员信息表")
public class AttPersonnelEntity extends BaseEntity<AttPersonnelEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("人员ID")
    @TableId(value = "personnel_id", type = IdType.AUTO)
    private Long personnelId;

    @ApiModelProperty("人员姓名")
    @TableField("personnel_name")
    private String personnelName;

    @ApiModelProperty("人员编码")
    @TableField("personnel_code")
    private String personnelCode;

    @ApiModelProperty("身份证号")
    @TableField("id_number")
    private String idNumber;

    @ApiModelProperty("所属供应商ID")
    @TableField("supplier_id")
    private Long supplierId;

    @ApiModelProperty("性别（0男 1女 2未知）")
    @TableField("gender")
    private String gender;

    @ApiModelProperty("出生日期")
    @TableField("birth_date")
    private Date birthDate;

    @ApiModelProperty("手机号码")
    @TableField("phone_number")
    private String phoneNumber;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("级别（01初级 02中级 03高级 04专家）")
    @TableField("level")
    private String level;

    @ApiModelProperty("职位（01开发 02测试 03运维 04项目经理）")
    @TableField("position")
    private String position;

    @ApiModelProperty("人月单价")
    @TableField("monthly_rate")
    private BigDecimal monthlyRate;

    @ApiModelProperty("入场日期")
    @TableField("entry_date")
    private Date entryDate;

    @ApiModelProperty("离场日期")
    @TableField("leave_date")
    private Date leaveDate;

    @ApiModelProperty("状态（0在岗 1离场 2休假）")
    @TableField("status")
    private String status;

    @ApiModelProperty("关联用户ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @Override
    public Serializable pkVal() {
        return this.personnelId;
    }
} 